public class Runnable implements java.lang.Runnable {

    @Override
    public void run() {
        for (int i =0;i<5;i++){
            System.out.println(Thread.currentThread().getName());
        }
    }

    public static void main(String[] args) {

        Runnable runnable = new Runnable();
        Thread thread1 = new Thread(runnable,"thread1");
        thread1.start();
        Thread thread2 = new Thread(runnable,"thread2");
        thread2.start();

        new Thread(new Runnable(),"thread3").start();


    }
}
